package lession4.PartA_Grammar

import kotlinx.serialization.Serializable
import kotlinx.serialization.encodeToString
import kotlinx.serialization.json.Json

fun main(){
    testJson()
}

@Serializable
data class Data(val a: Int, val str: String = "str")

fun testJson(){
    val dataList = listOf(Data(42), Data(12, "test"))
    val jsonList = Json.encodeToString(dataList)
    println(jsonList)
}